package cn.com.bluemoon.daps.model.vo;

import cn.com.bluemoon.daps.common.domain.UserPermissionApi;
import cn.com.bluemoon.daps.common.enums.DatabaseType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

@Data
public class ModelIds implements UserPermissionApi<String> {

    @ApiModelProperty(value = "数据库类型")
    @NotNull(message = "数据库类型不允许为空")
    private DatabaseType databaseType;

    @ApiModelProperty(value = "模型id")
    public String modelId;

    @ApiModelProperty(value = "模型表id")
    public String tableId;

    /**
     * @return 获取mvc传输中对应模型的id
     */
    @Override
    public String getUserPermissionKeyValue() {
        return getModelId();
    }
}
